package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

public interface UserMapper {
    //查找用户
    @Select("select * from user where phone=#{phone}")
    User findByPhone(String phone);

    @Insert("insert into user(phone,status) values(#{phone},#{status})")
    void save(User dbUser);
    //根据id查询订单数据
    @Select("Select * from user where id=#{userId}")
    User findById(Long userId);
}
